package com.iplant.mes.service.mesenum.sfc;

/**
 * 工装绑定元件状态
 */
public enum SFCFrockBindRecordStatus {
    /**
     * 保存
     */
    Default(0, "保存"),
    /**
     * 绑定
     */
    BINDING(1, "绑定"),
    /**
     * 解绑
     */
    UNBINDING(2, "解绑");

    private int value;
    private String label;

    SFCFrockBindRecordStatus(int value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 通过 value 的数值获取枚举实例
     */
    public static SFCFrockBindRecordStatus getEnumType(int val) {
        for (SFCFrockBindRecordStatus type : SFCFrockBindRecordStatus.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }
}
